import 'package:wch/generated/json/base/json_field.dart';
import 'dart:convert';

import '../generated/json/login_model.g.dart';

@JsonSerializable()
class LoginModel {
	int? code;
	String? msg;
	LoginModelData? data;

	LoginModel();

	factory LoginModel.fromJson(Map<String, dynamic> json) => $LoginModelFromJson(json);

	Map<String, dynamic> toJson() => $LoginModelToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class LoginModelData {
	int? expiredAt;
	String? accessToken;

	LoginModelData();

	factory LoginModelData.fromJson(Map<String, dynamic> json) => $LoginModelDataFromJson(json);

	Map<String, dynamic> toJson() => $LoginModelDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}